function install(req, request) {
	const apiUrl = {
		getDictionarys: '/www/app/getDictionarys.do', //获取字典 : {kind:"HPZL"}
		getOrgs: '/www/app/getOrgs.do', //获取机构 : {ywlx:业务类型,cllx:"01"<目前写死>,wftzsh:违法通知书号<处理类型为2时传入>}
		getDates: '/www/app/getDates.do', //获取对应日期 : {org_id:机构ID}
		getTimeSlots: '/www/app/getTimeSlots.do', //获取可预约时间段 : {"org_id":jtwfyy_org_id,"date":jtwfyy_yyrq,"ywlx":ywlx}
		appoint: '/www/app/appoint.do', //预约提交 : {"ywlx":ywlx,"c zmc":user.name,"sjhm":user.sjhm,"cjhm":cjhm,"cllx":hpzl,"quota_id":机构ID,"image_id":image_id,"clientId":user.clientId,"imgCode":imgCode,"wftzsh":wftzsh,"hpzl":hpzl,"hphm":hphm,"zjlx":zjlx,"zjhm":zjhm,"clsbdh":cjhm};
		getAppionts: '/www/app/getAppionts.do', //获取预约记录
		cancelAppoint: '/www/app/cancelAppoint.do' //取消预约
	};
	req.wfyy = {
		/* 获取字典*/
		getDictionarys(detail) {
			const url = req.baseUrl + apiUrl.getDictionarys;
			var data = {
				kind: detail
			};
			return request({
				url,
				data
			});
		},
		/* 获取机构*/
		getOrgs(ywlx, wftzsh) {
			const url = req.baseUrl + apiUrl.getOrgs;
			var data = {
				ywlx: ywlx,
				wftzsh: wftzsh
			};
			return request({
				url,
				data
			});
		},
		/* 获取对应日期*/
		getDates(org_id) {
			const url = req.baseUrl + apiUrl.getDates;
			var data = {
				org_id: org_id
			};
			return request({
				url,
				data
			});
		},
		/* 获取可预约时间段*/
		getTimeSlots(org_id, date, ywlx) {
			const url = req.baseUrl + apiUrl.getTimeSlots;
			var data = {
				org_id: org_id,
				date: date,
				ywlx: ywlx
			};
			return request({
				url,
				data
			});
		},
		/* 预约提交*/
		appoint(ywlx, czmc, sjhm, cjhm, cllx, quota_id, image_id, clientId, imgCode, wftzsh, hpzl, hphm, zjlx, zjhm, clsbdh) {
			const url = req.baseUrl + apiUrl.appoint;
			var data = {
				ywlx,
				czmc,
				sjhm,
				cjhm,
				cllx,
				quota_id,
				image_id,
				clientId,
				imgCode,
				wftzsh,
				hpzl,
				hphm,
				zjlx,
				zjhm,
				clsbdh
			};
			return request({
				url,
				data
			});
		},
		/* 获取预约记录 */
		getAppionts() {
			const url = req.baseUrl + apiUrl.getAppionts;
			return request({
				url
			});
		},
		/* 取消预约 */
		cancelAppoint(appoint_id) {
			const url = req.baseUrl + apiUrl.cancelAppoint;
			var data = {
				appoint_id
			}
			return request({
				url,
				data
			})
		}
	};
}

module.exports = {
	install,
};
